package org.yjw.service.user.impl;

import org.apache.ibatis.session.SqlSession;
import org.yjw.dao.user.UserMapper;
import org.yjw.entity.user.User;
import org.yjw.service.user.UserService;
import org.yjw.util.MyBatisUtil;

public class UserServiceImpl implements UserService {

    private static UserMapper userMapper;

    static {
        SqlSession sqlSession = MyBatisUtil.getSqlSession();
        userMapper = sqlSession.getMapper(UserMapper.class);
    }

    @Override
    public User findByid(Long id) {
        User byid = userMapper.findByid(id);
        return byid;
    }
}
